from django import forms
from coolblog import models

class ArticleForm(forms.ModelForm):
    class Meta:
        model = models.Article
        fields = ('title', 'content', 'category', 'slug', 'tags', 'author',)

class BlogForm(forms.ModelForm):
    class Meta:
        model = models.Blog
        fields = ('name', 'keywords', 'description', 
                  'entries_per_page', 'hide_header',)
        widgets = {'entries_per_page': 
                   forms.Select(choices=
                                ((5, 5), (10, 10), (15, 15), (20, 20)))}

class CategoryForm(forms.ModelForm):
    class Meta:
        model = models.Category
        fields = ('name', 'slug',)
